<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title> kkpager-self</title>
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<link rel="stylesheet" href="css/content.css" />
	
</head>
<body class="">
	<div class="conteiner">
		<div class="details-cont">
			<div class="pag-cont">
				<div class="pag-contmain">
					<span class="pag-sq"> < 上一页  </span>
					<span class="pag-sq pag-sq-on">1</span>
					<span class="pag-sq">2</span>
					<span class="pag-sq">3</span>
					<span class="pag-sq">4</span>
					<span class="pag-sq">5</span>
					<span>...</span>
					<span class="pag-sq">下一页 > </span>
					<span>共109页，到第<input type="text" class="pag-input" placeholder="2" />页</span>
					<button class="index-btn small-whbtn">确定</button>
				</div>
			</div>
		</div>
		<div class="details-cont">
			<div class="pag-cont">
				<div id="kkpager" class="pag-contmain"></div>
			</div>
		</div>
		<div class="details-cont">
			<div class="pag-cont">
				<div id="kkpager" class="pag-contmain">
				<span class="disabled">&lt;上一页</span>
					<span class="pag-sq pag-sq-on">1</span>
					<span class="pag-sq" onclick=" kkpager.gopage(2)">2</span>
					<span class="pag-sq" onclick=" kkpager.gopage(3)">3</span>
					<span class="pag-sq" onclick=" kkpager.gopage(4)">4</span>
					<span class="pag-sq" onclick=" kkpager.gopage(5)">5</span>
					<span class="pag-sq" onclick=" kkpager.gopage(6)">6</span>
					<span class="pag-sq" onclick=" kkpager.gopage(7)">7</span>
					<span >...</span>
					<span class="pag-sq" onclick=" kkpager.gopage(2)">下一页&gt;</span>
				
				<span>共10页,到第<input type="text" id="kkpager_btn_go_input" value="" placeholder="2" class="pag-input">页</span>
						<input type="button" id="kkpager_btn_go" onclick="kkpager.gopage()" value="确定" class="index-btn small-whbtn">
						
				</div>
			</div>
		</div>
	</div>	
	
</body>
<script type="text/javascript" src="js/jquery.min.js" ></script>
<script type="text/javascript" src="js/kkpager.min.js"></script>
<script type="text/javascript">
function getParameter(name) { 
	var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); 
	var r = window.location.search.substr(1).match(reg); 
	if (r!=null) return unescape(r[2]); return null;
}

//init
$(function(){
	var totalPage = 10;
	var totalRecords = 11;
	var pageNo = getParameter('pno');
	if(!pageNo){
		pageNo = 5;
	}
	//生成分页
	//有些参数是可选的，比如lang，若不传有默认值
	kkpager.generPageHtml({
		isShowFirstPageBtn: false,
		isShowLastPageBtn: false,
		isShowCurrPage: false,
		mode:	'click',
		pno : pageNo,
		//总页码
		total : totalPage,
		//总数据条数
		totalRecords : totalRecords,
		lang: {
			prePageText: '&lt;上一页',
			nextPageText: '下一页&gt;',
			gopageBeforeText: ',到第',
		},
		click : function(n){
			this.selectPage(n);
		}
	});
});
</script>
</html>